storage: Passphrase dialog fields can reveal the text#18906
storage: Passphrase dialog fields can reveal the text#18906martinpitt merged 1 commit intocockpit-project:mainfrom
Conversation
544e3ca to
36fdfe4
Compare
|
Is this some new recommendation from PatternFly or somewhere else? This lacks a reference and a justification. I don't like this. It's IMNSHO very useful to confirm that you can reproduce the passphrase at least once, independent of the revealing. And not let this be done by some Yubikey, a cat walking over your keyboard, or fat-fingering the result. Also, it's conflicty now, apparently some other pixel update landed in between. |
I thought this is what we are doing in Cockpit, and the Storage page just has to catch up. The sospage uses this pattern (single text entry with reveal functionality for a new password), but I can't find any other... @garrett, can you clarify? Should all password fields in Cockpit have a reveal functionality? Should we have a single text input for new passwords, or two? I know of these articles: |
|
To clarify: I welcome the "reveal" functionality. I don't like the "drop confirmation input" part. |
36fdfe4 to
5e72117
Compare
|
Nielsen Norman Group is huge in the UI/UX design space (they've literally written several authoritative books on the subject). Here are several more posts from others about removing the password confirmation:
And as far as PatternFly is concerned: None of PatternFly's password creation examples have a repeat. But they do (usually) have a reveal. So: What's the way our users will be creating and storing these passwords?
A confirmation prompt is not needed for any of these examples and actively gets in the way. Perhaps, if they are making something up themselves it might be useful. But even then, they might type the wrong thing twice. Or have caps lock on. Or number lock (if they're entering keys on the keypad). Or sticky keys might interfere, if they're using accessibility features. Having a second entry means more busywork. It's also not actually used for confirmation! If we were actually having a second one for confirmation, then we'd actually ask for the password after creation and checking to see if it was unlocked, right? In other words: having a "confirmation" field doesn't actually do anything at all to validate the password to make sure it's correct. Anyway, while it's been the general recommendation to drop the confirmation/repeat/verify password field for around the past decade and a half, it's not commonplace in a lot of OS designs yet. GNOME next user creation:
macOS Monterey (previous version) user creation: Windows 11 local user creation: However, these are all user account creation UIs, not disk encryption. macOS Ventura (latest version) has info here: https://support.apple.com/guide/disk-utility/encrypt-protect-a-storage-device-password-dskutl35612/mac which says, "8. Enter and verify a password, then click Choose." (emphasis added). Here's GNOME's current UI from GNOME Disks for creating a LUKS volume: (I haven't found anything about it in the various redesigns @ https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/issues/28#note_305987 or https://gitlab.gnome.org/Teams/Design/app-mockups/-/blob/master/disks/disks.png or the recent tracking issue @ https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/issues/274) So: What has been a "best practice" for the web for well over a decade still hasn't made it into user & disk password creation UI in OSes yet. Now: I wonder what other PF-using RH products do. (I seem to recall OpenShift not having a repeat, but I couldn't find the screenshot I took a while ago during a demo call.) |
|
Summary: While dropping the verify is generally accepted design advice for the web (and there are several articles and studies showing that it is not needed), it's not in practice everywhere (as seen from the OS design screenshots I posted above). And Pitti doesn't agree with it. We should definitely get the view password in regardless and not block on dropping the repeat password. |
|
Thanks @garrett for the references and research! To clarify, this wasn't a veto, just a strong feeling that I don't like it.
In that case it's cheap to paste it twice.
That's exactly the case that I'm concerned about -- if your password is so complicated that you make an accidental typo, it could have major consequences if you don't actually type the password that you intend to. And then after a reboot you can't access your files any more. Proving that the user is able to type it at least twice reduces the chance of that happening.
Not plausible for an encrypted file system, these are usually unlocked during boot, aren't they? (Or with clevis/tang) If you feel strongly about dropping it, I don't veto it -- I just wanted to put this into the discussion that I still see value in it. |
0452c99 to
2658277
Compare
It's fine if we don't, especially for disk encryption. We might want to consider dropping it elsewhere though (user accounts, especially ones that aren't the logged in user of Cockpit)... passwords for accounts and other things like disk encryption are different use cases. I was surprised that GNOME, macOS, and Windows all have a second prompt in all of them, for both user and disk. KDE does this too, BTW: Therefore, I'm fine with keeping this to passphrase reveal only. We can discuss a possible removal of repeat/verify in another place. |
2658277 to
c821894
Compare
Thanks for figuring this all out! I have updated the PR to only add the reveal functionality. |
martinpitt
left a comment
There was a problem hiding this comment.
If by some magic new_passphrase was intended,then I'd like to understand it. Thanks!
c821894 to
5b7c7f1
Compare
martinpitt
left a comment
There was a problem hiding this comment.
Ah, still needs a pixel update, see the failed tests.
And mark entries for new passwords accordingly, in the hope that browsers will do the right thing.
5b7c7f1 to
6a3e725
Compare
| PassInput("new_passphrase", _("New passphrase"), | ||
| { validate: val => !val.length && _("Passphrase cannot be empty") }), | ||
| { | ||
| validate: val => !val.length && _("Passphrase cannot be empty"), |
There was a problem hiding this comment.
This added line is not executed by any test. Details
| PassInput("new_passphrase2", _("Repeat passphrase"), | ||
| { validate: (val, vals) => vals.new_passphrase.length && vals.new_passphrase != val && _("Passphrases do not match") }) | ||
| { | ||
| validate: (val, vals) => vals.new_passphrase.length && vals.new_passphrase != val && _("Passphrases do not match"), |
There was a problem hiding this comment.
This added line is not executed by any test. Details







No description provided.